#ifndef _VOLUME_RENDERING_WIDGET_H_
#define _VOLUME_RENDERING_WIDGET_H_

#include <QWidget>

class HoverPoints;

class ShadeWidget : public QWidget
{
	Q_OBJECT
public:
	enum ShadeType {
		RedShade,
		GreenShade,
		BlueShade,
		ARGBShade
	};

	ShadeWidget(ShadeType type, QWidget *parent);

	void setGradientStops(const QGradientStops &stops);

	void paintEvent(QPaintEvent *e);

	QSize sizeHint() const { return QSize(150, 40); }
	QPolygonF points() const;

	HoverPoints *hoverPoints() const { return m_hoverPoints; }

	uint colorAt(int x);

signals:
	void pointsChanged();

private:
	void generateShade();

	ShadeType m_shade_type;
	QImage m_shade;
	HoverPoints *m_hoverPoints;
	QLinearGradient m_alpha_gradient;
};


#endif

